Integrand size = 16, antiderivative size = 134 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=-\frac {3 c d^2 x}{4 b^2}-\frac {3 d^3 x^2}{8 b^2}+\frac {(c+d x)^4}{8 d}+\frac {3 d^2 (c+d x) \cos (a+b x) \sin (a+b x)}{4 b^3}-\frac {(c+d x)^3 \cos (a+b x) \sin (a+b x)}{2 b}-\frac {3 d^3 \sin ^2(a+b x)}{8 b^4}+\frac {3 d (c+d x)^2 \sin ^2(a+b x)}{4 b^2} \]
-3/4*c*d^2*x/b^2-3/8*d^3*x^2/b^2+1/8*(d*x+c)^4/d+3/4*d^2*(d*x+c)*cos(b*x+a )*sin(b*x+a)/b^3-1/2*(d*x+c)^3*cos(b*x+a)*sin(b*x+a)/b-3/8*d^3*sin(b*x+a)^ 2/b^4+3/4*d*(d*x+c)^2*sin(b*x+a)^2/b^2
Time = 0.29 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.79 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=\frac {2 b^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )-3 d \left (-d^2+2 b^2 (c+d x)^2\right ) \cos (2 (a+b x))-2 b (c+d x) \left (-3 d^2+2 b^2 (c+d x)^2\right ) \sin (2 (a+b x))}{16 b^4} \]
(2*b^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3) - 3*d*(-d^2 + 2*b^2*( c + d*x)^2)*Cos[2*(a + b*x)] - 2*b*(c + d*x)*(-3*d^2 + 2*b^2*(c + d*x)^2)* Sin[2*(a + b*x)])/(16*b^4)
Time = 0.34 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3042, 3792, 17, 3042, 3791, 17}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x)^3 \sin ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^3 \sin (a+b x)^2dx\) |
\(\Big \downarrow \) 3792 |
\(\displaystyle -\frac {3 d^2 \int (c+d x) \sin ^2(a+b x)dx}{2 b^2}+\frac {1}{2} \int (c+d x)^3dx+\frac {3 d (c+d x)^2 \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x)^3 \sin (a+b x) \cos (a+b x)}{2 b}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle -\frac {3 d^2 \int (c+d x) \sin ^2(a+b x)dx}{2 b^2}+\frac {3 d (c+d x)^2 \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x)^3 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^4}{8 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3 d^2 \int (c+d x) \sin (a+b x)^2dx}{2 b^2}+\frac {3 d (c+d x)^2 \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x)^3 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^4}{8 d}\) |
\(\Big \downarrow \) 3791 |
\(\displaystyle -\frac {3 d^2 \left (\frac {1}{2} \int (c+d x)dx+\frac {d \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x) \sin (a+b x) \cos (a+b x)}{2 b}\right )}{2 b^2}+\frac {3 d (c+d x)^2 \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x)^3 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^4}{8 d}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle -\frac {3 d^2 \left (\frac {d \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x) \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^2}{4 d}\right )}{2 b^2}+\frac {3 d (c+d x)^2 \sin ^2(a+b x)}{4 b^2}-\frac {(c+d x)^3 \sin (a+b x) \cos (a+b x)}{2 b}+\frac {(c+d x)^4}{8 d}\) |
(c + d*x)^4/(8*d) - ((c + d*x)^3*Cos[a + b*x]*Sin[a + b*x])/(2*b) + (3*d*( c + d*x)^2*Sin[a + b*x]^2)/(4*b^2) - (3*d^2*((c + d*x)^2/(4*d) - ((c + d*x )*Cos[a + b*x]*Sin[a + b*x])/(2*b) + (d*Sin[a + b*x]^2)/(4*b^2)))/(2*b^2)
3.1.9.3.1 Defintions of rubi rules used
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Simp[b*(c + d*x)*Cos[e + f*x ]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^2*((n - 1)/n) Int[(c + d* x)*(b*Sin[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]
Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbo l] :> Simp[d*m*(c + d*x)^(m - 1)*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Sim p[b*(c + d*x)^m*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^ 2*((n - 1)/n) Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[d^2 *m*((m - 1)/(f^2*n^2)) Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]
Time = 0.25 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.90
method | result | size |
parallelrisch | \(\frac {-4 \left (d x +c \right ) \sin \left (2 b x +2 a \right ) \left (\left (d x +c \right )^{2} b^{2}-\frac {3 d^{2}}{2}\right ) b -6 \left (\left (d x +c \right )^{2} b^{2}-\frac {d^{2}}{2}\right ) d \cos \left (2 b x +2 a \right )+2 \left (d^{3} x^{4}+4 c \,d^{2} x^{3}+6 d \,c^{2} x^{2}+4 c^{3} x \right ) b^{4}+6 b^{2} c^{2} d -3 d^{3}}{16 b^{4}}\) | \(121\) |
risch | \(\frac {d^{3} x^{4}}{8}+\frac {c \,d^{2} x^{3}}{2}+\frac {3 d \,c^{2} x^{2}}{4}+\frac {c^{3} x}{2}+\frac {c^{4}}{8 d}-\frac {3 d \left (2 d^{2} x^{2} b^{2}+4 b^{2} c d x +2 b^{2} c^{2}-d^{2}\right ) \cos \left (2 b x +2 a \right )}{16 b^{4}}-\frac {\left (2 b^{2} d^{3} x^{3}+6 b^{2} c \,d^{2} x^{2}+6 b^{2} c^{2} d x +2 b^{2} c^{3}-3 d^{3} x -3 c \,d^{2}\right ) \sin \left (2 b x +2 a \right )}{8 b^{3}}\) | \(158\) |
norman | \(\frac {c \,d^{2} x^{3} \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\frac {d^{3} x^{3} \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {d^{3} x^{4}}{8}+\frac {c \,d^{2} x^{3}}{2}+\frac {d^{3} x^{4} \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4}+\frac {d^{3} x^{4} \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8}+\frac {\left (6 b^{2} c^{2} d -3 d^{3}\right ) \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b^{4}}+\frac {c \,d^{2} x^{3} \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2}-\frac {c \left (2 b^{2} c^{2}-3 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b^{3}}+\frac {c \left (2 b^{2} c^{2}-3 d^{2}\right ) \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b^{3}}+\frac {c \left (2 b^{2} c^{2}-3 d^{2}\right ) x}{4 b^{2}}+\frac {3 d \left (2 b^{2} c^{2}-d^{2}\right ) x^{2}}{8 b^{2}}-\frac {d^{3} x^{3} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}-\frac {3 c \,d^{2} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {3 c \,d^{2} x^{2} \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {c \left (2 b^{2} c^{2}-3 d^{2}\right ) x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b^{2}}+\frac {c \left (2 b^{2} c^{2}+9 d^{2}\right ) x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b^{2}}-\frac {3 d \left (2 b^{2} c^{2}-d^{2}\right ) x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b^{3}}+\frac {3 d \left (2 b^{2} c^{2}-d^{2}\right ) x \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b^{3}}+\frac {3 d \left (2 b^{2} c^{2}-d^{2}\right ) x^{2} \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b^{2}}+\frac {3 d \left (2 b^{2} c^{2}+3 d^{2}\right ) x^{2} \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b^{2}}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{2}}\) | \(526\) |
derivativedivides | \(\frac {-\frac {a^{3} d^{3} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b^{3}}+\frac {3 a^{2} c \,d^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}+\frac {3 a^{2} d^{3} \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b^{3}}-\frac {3 a \,c^{2} d \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b}-\frac {6 a c \,d^{2} \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b^{2}}-\frac {3 a \,d^{3} \left (\left (b x +a \right )^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right ) \left (\cos ^{2}\left (b x +a \right )\right )}{2}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}-\frac {\left (b x +a \right )^{3}}{3}\right )}{b^{3}}+c^{3} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )+\frac {3 c^{2} d \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b}+\frac {3 c \,d^{2} \left (\left (b x +a \right )^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right ) \left (\cos ^{2}\left (b x +a \right )\right )}{2}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}-\frac {\left (b x +a \right )^{3}}{3}\right )}{b^{2}}+\frac {d^{3} \left (\left (b x +a \right )^{3} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {3 \left (b x +a \right )^{2} \left (\cos ^{2}\left (b x +a \right )\right )}{4}+\frac {3 \left (b x +a \right ) \left (\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{2}-\frac {3 \left (b x +a \right )^{2}}{8}-\frac {3 \left (\sin ^{2}\left (b x +a \right )\right )}{8}-\frac {3 \left (b x +a \right )^{4}}{8}\right )}{b^{3}}}{b}\) | \(587\) |
default | \(\frac {-\frac {a^{3} d^{3} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b^{3}}+\frac {3 a^{2} c \,d^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}+\frac {3 a^{2} d^{3} \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b^{3}}-\frac {3 a \,c^{2} d \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{b}-\frac {6 a c \,d^{2} \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b^{2}}-\frac {3 a \,d^{3} \left (\left (b x +a \right )^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right ) \left (\cos ^{2}\left (b x +a \right )\right )}{2}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}-\frac {\left (b x +a \right )^{3}}{3}\right )}{b^{3}}+c^{3} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )+\frac {3 c^{2} d \left (\left (b x +a \right ) \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right )^{2}}{4}+\frac {\left (\sin ^{2}\left (b x +a \right )\right )}{4}\right )}{b}+\frac {3 c \,d^{2} \left (\left (b x +a \right )^{2} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {\left (b x +a \right ) \left (\cos ^{2}\left (b x +a \right )\right )}{2}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}-\frac {\left (b x +a \right )^{3}}{3}\right )}{b^{2}}+\frac {d^{3} \left (\left (b x +a \right )^{3} \left (-\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )-\frac {3 \left (b x +a \right )^{2} \left (\cos ^{2}\left (b x +a \right )\right )}{4}+\frac {3 \left (b x +a \right ) \left (\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{2}+\frac {b x}{2}+\frac {a}{2}\right )}{2}-\frac {3 \left (b x +a \right )^{2}}{8}-\frac {3 \left (\sin ^{2}\left (b x +a \right )\right )}{8}-\frac {3 \left (b x +a \right )^{4}}{8}\right )}{b^{3}}}{b}\) | \(587\) |
1/16*(-4*(d*x+c)*sin(2*b*x+2*a)*((d*x+c)^2*b^2-3/2*d^2)*b-6*((d*x+c)^2*b^2 -1/2*d^2)*d*cos(2*b*x+2*a)+2*(d^3*x^4+4*c*d^2*x^3+6*c^2*d*x^2+4*c^3*x)*b^4 +6*b^2*c^2*d-3*d^3)/b^4
Time = 0.30 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.41 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=\frac {b^{4} d^{3} x^{4} + 4 \, b^{4} c d^{2} x^{3} + 3 \, {\left (2 \, b^{4} c^{2} d + b^{2} d^{3}\right )} x^{2} - 3 \, {\left (2 \, b^{2} d^{3} x^{2} + 4 \, b^{2} c d^{2} x + 2 \, b^{2} c^{2} d - d^{3}\right )} \cos \left (b x + a\right )^{2} - 2 \, {\left (2 \, b^{3} d^{3} x^{3} + 6 \, b^{3} c d^{2} x^{2} + 2 \, b^{3} c^{3} - 3 \, b c d^{2} + 3 \, {\left (2 \, b^{3} c^{2} d - b d^{3}\right )} x\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, {\left (2 \, b^{4} c^{3} + 3 \, b^{2} c d^{2}\right )} x}{8 \, b^{4}} \]
1/8*(b^4*d^3*x^4 + 4*b^4*c*d^2*x^3 + 3*(2*b^4*c^2*d + b^2*d^3)*x^2 - 3*(2* b^2*d^3*x^2 + 4*b^2*c*d^2*x + 2*b^2*c^2*d - d^3)*cos(b*x + a)^2 - 2*(2*b^3 *d^3*x^3 + 6*b^3*c*d^2*x^2 + 2*b^3*c^3 - 3*b*c*d^2 + 3*(2*b^3*c^2*d - b*d^ 3)*x)*cos(b*x + a)*sin(b*x + a) + 2*(2*b^4*c^3 + 3*b^2*c*d^2)*x)/b^4
Leaf count of result is larger than twice the leaf count of optimal. 456 vs. \(2 (131) = 262\).
Time = 0.36 (sec) , antiderivative size = 456, normalized size of antiderivative = 3.40 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=\begin {cases} \frac {c^{3} x \sin ^{2}{\left (a + b x \right )}}{2} + \frac {c^{3} x \cos ^{2}{\left (a + b x \right )}}{2} + \frac {3 c^{2} d x^{2} \sin ^{2}{\left (a + b x \right )}}{4} + \frac {3 c^{2} d x^{2} \cos ^{2}{\left (a + b x \right )}}{4} + \frac {c d^{2} x^{3} \sin ^{2}{\left (a + b x \right )}}{2} + \frac {c d^{2} x^{3} \cos ^{2}{\left (a + b x \right )}}{2} + \frac {d^{3} x^{4} \sin ^{2}{\left (a + b x \right )}}{8} + \frac {d^{3} x^{4} \cos ^{2}{\left (a + b x \right )}}{8} - \frac {c^{3} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {3 c^{2} d x \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {3 c d^{2} x^{2} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {d^{3} x^{3} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{2 b} - \frac {3 c^{2} d \cos ^{2}{\left (a + b x \right )}}{4 b^{2}} + \frac {3 c d^{2} x \sin ^{2}{\left (a + b x \right )}}{4 b^{2}} - \frac {3 c d^{2} x \cos ^{2}{\left (a + b x \right )}}{4 b^{2}} + \frac {3 d^{3} x^{2} \sin ^{2}{\left (a + b x \right )}}{8 b^{2}} - \frac {3 d^{3} x^{2} \cos ^{2}{\left (a + b x \right )}}{8 b^{2}} + \frac {3 c d^{2} \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{4 b^{3}} + \frac {3 d^{3} x \sin {\left (a + b x \right )} \cos {\left (a + b x \right )}}{4 b^{3}} + \frac {3 d^{3} \cos ^{2}{\left (a + b x \right )}}{8 b^{4}} & \text {for}\: b \neq 0 \\\left (c^{3} x + \frac {3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac {d^{3} x^{4}}{4}\right ) \sin ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \]
Piecewise((c**3*x*sin(a + b*x)**2/2 + c**3*x*cos(a + b*x)**2/2 + 3*c**2*d* x**2*sin(a + b*x)**2/4 + 3*c**2*d*x**2*cos(a + b*x)**2/4 + c*d**2*x**3*sin (a + b*x)**2/2 + c*d**2*x**3*cos(a + b*x)**2/2 + d**3*x**4*sin(a + b*x)**2 /8 + d**3*x**4*cos(a + b*x)**2/8 - c**3*sin(a + b*x)*cos(a + b*x)/(2*b) - 3*c**2*d*x*sin(a + b*x)*cos(a + b*x)/(2*b) - 3*c*d**2*x**2*sin(a + b*x)*co s(a + b*x)/(2*b) - d**3*x**3*sin(a + b*x)*cos(a + b*x)/(2*b) - 3*c**2*d*co s(a + b*x)**2/(4*b**2) + 3*c*d**2*x*sin(a + b*x)**2/(4*b**2) - 3*c*d**2*x* cos(a + b*x)**2/(4*b**2) + 3*d**3*x**2*sin(a + b*x)**2/(8*b**2) - 3*d**3*x **2*cos(a + b*x)**2/(8*b**2) + 3*c*d**2*sin(a + b*x)*cos(a + b*x)/(4*b**3) + 3*d**3*x*sin(a + b*x)*cos(a + b*x)/(4*b**3) + 3*d**3*cos(a + b*x)**2/(8 *b**4), Ne(b, 0)), ((c**3*x + 3*c**2*d*x**2/2 + c*d**2*x**3 + d**3*x**4/4) *sin(a)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 442 vs. \(2 (120) = 240\).
Time = 0.20 (sec) , antiderivative size = 442, normalized size of antiderivative = 3.30 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=\frac {4 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} c^{3} - \frac {12 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a c^{2} d}{b} + \frac {12 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a^{2} c d^{2}}{b^{2}} - \frac {4 \, {\left (2 \, b x + 2 \, a - \sin \left (2 \, b x + 2 \, a\right )\right )} a^{3} d^{3}}{b^{3}} + \frac {6 \, {\left (2 \, {\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right )\right )} c^{2} d}{b} - \frac {12 \, {\left (2 \, {\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right )\right )} a c d^{2}}{b^{2}} + \frac {6 \, {\left (2 \, {\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right ) - \cos \left (2 \, b x + 2 \, a\right )\right )} a^{2} d^{3}}{b^{3}} + \frac {2 \, {\left (4 \, {\left (b x + a\right )}^{3} - 6 \, {\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) - 3 \, {\left (2 \, {\left (b x + a\right )}^{2} - 1\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} c d^{2}}{b^{2}} - \frac {2 \, {\left (4 \, {\left (b x + a\right )}^{3} - 6 \, {\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) - 3 \, {\left (2 \, {\left (b x + a\right )}^{2} - 1\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} a d^{3}}{b^{3}} + \frac {{\left (2 \, {\left (b x + a\right )}^{4} - 3 \, {\left (2 \, {\left (b x + a\right )}^{2} - 1\right )} \cos \left (2 \, b x + 2 \, a\right ) - 2 \, {\left (2 \, {\left (b x + a\right )}^{3} - 3 \, b x - 3 \, a\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d^{3}}{b^{3}}}{16 \, b} \]
1/16*(4*(2*b*x + 2*a - sin(2*b*x + 2*a))*c^3 - 12*(2*b*x + 2*a - sin(2*b*x + 2*a))*a*c^2*d/b + 12*(2*b*x + 2*a - sin(2*b*x + 2*a))*a^2*c*d^2/b^2 - 4 *(2*b*x + 2*a - sin(2*b*x + 2*a))*a^3*d^3/b^3 + 6*(2*(b*x + a)^2 - 2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a))*c^2*d/b - 12*(2*(b*x + a)^2 - 2* (b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a))*a*c*d^2/b^2 + 6*(2*(b*x + a )^2 - 2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a))*a^2*d^3/b^3 + 2*(4* (b*x + a)^3 - 6*(b*x + a)*cos(2*b*x + 2*a) - 3*(2*(b*x + a)^2 - 1)*sin(2*b *x + 2*a))*c*d^2/b^2 - 2*(4*(b*x + a)^3 - 6*(b*x + a)*cos(2*b*x + 2*a) - 3 *(2*(b*x + a)^2 - 1)*sin(2*b*x + 2*a))*a*d^3/b^3 + (2*(b*x + a)^4 - 3*(2*( b*x + a)^2 - 1)*cos(2*b*x + 2*a) - 2*(2*(b*x + a)^3 - 3*b*x - 3*a)*sin(2*b *x + 2*a))*d^3/b^3)/b
Time = 0.28 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.14 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=\frac {1}{8} \, d^{3} x^{4} + \frac {1}{2} \, c d^{2} x^{3} + \frac {3}{4} \, c^{2} d x^{2} + \frac {1}{2} \, c^{3} x - \frac {3 \, {\left (2 \, b^{2} d^{3} x^{2} + 4 \, b^{2} c d^{2} x + 2 \, b^{2} c^{2} d - d^{3}\right )} \cos \left (2 \, b x + 2 \, a\right )}{16 \, b^{4}} - \frac {{\left (2 \, b^{3} d^{3} x^{3} + 6 \, b^{3} c d^{2} x^{2} + 6 \, b^{3} c^{2} d x + 2 \, b^{3} c^{3} - 3 \, b d^{3} x - 3 \, b c d^{2}\right )} \sin \left (2 \, b x + 2 \, a\right )}{8 \, b^{4}} \]
1/8*d^3*x^4 + 1/2*c*d^2*x^3 + 3/4*c^2*d*x^2 + 1/2*c^3*x - 3/16*(2*b^2*d^3* x^2 + 4*b^2*c*d^2*x + 2*b^2*c^2*d - d^3)*cos(2*b*x + 2*a)/b^4 - 1/8*(2*b^3 *d^3*x^3 + 6*b^3*c*d^2*x^2 + 6*b^3*c^2*d*x + 2*b^3*c^3 - 3*b*d^3*x - 3*b*c *d^2)*sin(2*b*x + 2*a)/b^4
Time = 0.38 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.71 \[ \int (c+d x)^3 \sin ^2(a+b x) \, dx=\frac {\frac {3\,d^3\,\cos \left (2\,a+2\,b\,x\right )}{2}+4\,b^4\,c^3\,x-2\,b^3\,c^3\,\sin \left (2\,a+2\,b\,x\right )+b^4\,d^3\,x^4-3\,b^2\,c^2\,d\,\cos \left (2\,a+2\,b\,x\right )+6\,b^4\,c^2\,d\,x^2+4\,b^4\,c\,d^2\,x^3-3\,b^2\,d^3\,x^2\,\cos \left (2\,a+2\,b\,x\right )-2\,b^3\,d^3\,x^3\,\sin \left (2\,a+2\,b\,x\right )+3\,b\,c\,d^2\,\sin \left (2\,a+2\,b\,x\right )+3\,b\,d^3\,x\,\sin \left (2\,a+2\,b\,x\right )-6\,b^2\,c\,d^2\,x\,\cos \left (2\,a+2\,b\,x\right )-6\,b^3\,c^2\,d\,x\,\sin \left (2\,a+2\,b\,x\right )-6\,b^3\,c\,d^2\,x^2\,\sin \left (2\,a+2\,b\,x\right )}{8\,b^4} \]
((3*d^3*cos(2*a + 2*b*x))/2 + 4*b^4*c^3*x - 2*b^3*c^3*sin(2*a + 2*b*x) + b ^4*d^3*x^4 - 3*b^2*c^2*d*cos(2*a + 2*b*x) + 6*b^4*c^2*d*x^2 + 4*b^4*c*d^2* x^3 - 3*b^2*d^3*x^2*cos(2*a + 2*b*x) - 2*b^3*d^3*x^3*sin(2*a + 2*b*x) + 3* b*c*d^2*sin(2*a + 2*b*x) + 3*b*d^3*x*sin(2*a + 2*b*x) - 6*b^2*c*d^2*x*cos( 2*a + 2*b*x) - 6*b^3*c^2*d*x*sin(2*a + 2*b*x) - 6*b^3*c*d^2*x^2*sin(2*a + 2*b*x))/(8*b^4)